package com.example.android.network.service;

import com.example.android.bean.Login;
import com.example.android.bean.LoginToken;

import java.util.List;

import io.reactivex.rxjava3.core.Flowable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;

import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Path;


public interface LoginService {
    @POST("auth/login")
    @FormUrlEncoded
    Flowable<Login> getLoginData(@Field("userAccount") String userAccount, @Field("userPassword")String userPassword);

    @GET("userservice/tbToken/getToken/{userId}")
    Flowable<List<LoginToken>> getTokenData(@Path("userId")int userId, @Header("token")String jwt);
}
